<template>
    <div>
      <h1>权益增加</h1>
      <table class="table table-bordeered">
        <tbody>
            <tr>
                <td>权益名称</td>
                <td>
                    <input type="text" v-model="info.RightName">
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input type="button" value="添加" class="btn btn-danger" @click="ok">
                </td>
            </tr>
        </tbody>
      </table>
    </div>
</template>

<script setup lang="ts">
//响应式数据
import {ref,reactive,onMounted} from 'vue';
import axios from 'axios';
import moment from 'moment';
//跳转
import {useRouter} from 'vue-router';
const router=useRouter();



let info:any=reactive({
    RightName:'',
})



const ok=()=>{
    axios({
        url:'https://localhost:7193/api/Member/AddMumber',
        method:'post',
        data:info,
    })
    .then(res=>{
        console.log(res);
        if(res.data>0){
            alert('添加成功');
            router.push('/mumberlist');
        }
        else{
            alert('添加失败');
        }
    })
}

</script>

<style scoped>

</style>